/*
 * @Author: chen haoxuan
 * @Date: 2021-06-09 22:25:02
 * @LastEditTime: 2021-06-09 23:06:19
 */
#include <iostream>
#include <string>
using namespace std;
class Teacher
{
public:
  Teacher(string, int, char, string, int, string);
  void display();

protected:
  string name;
  int age;
  char sex;
  string addr;
  int tel;
  string title;
};
Teacher::Teacher(string nam, int a, char s, string ad, int t, string ti)
{
  name = nam;
  age = a;
  sex = s;
  addr = ad;
  tel = t;
  title = ti;
}
void Teacher::display()
{
  cout << "name: " << name << endl;
  cout << "age: " << age << endl;
  cout << "sex: " << sex << endl;
  cout << "address: " << addr << endl;
  cout << "name: " << name << endl;
  cout << "title: " << title << endl;
}
class Cadre
{
public:
  Cadre(string, int, char, string, int, string);
  void display1();

protected:
  string name;
  int age;
  char sex;
  string addr;
  int tel;
  string post;
};
Cadre::Cadre(string nam, int a, char s, string ad, int te, string po)
{
  name = nam;
  age = a;
  sex = s;
  addr = ad;
  tel = te;
  post = po;
}
void Cadre::display1()
{
  cout << "name: " << name << endl;
  cout << "age: " << age << endl;
  cout << "sex: " << sex << endl;
  cout << "address: " << addr << endl;
  cout << "tel: " << tel << endl;
  cout << "post: " << post << endl;
}
class Teacher_Cadre : public Teacher, public Cadre
{
public:
  Teacher_Cadre(string nam, int a, char s, string ad, int te, string tit, string po, double w) : Teacher(nam, a, s, ad, te, tit), Cadre(nam, a, s, ad, te, po), wage(w) {}
  void show();

private:
  double wage;
};
void Teacher_Cadre::show()
{
  Teacher::display();
  cout << "post: " << Cadre::post << endl;
  cout << "wage: " << wage << endl;
};
int main()
{
  Teacher_Cadre person("wang-li", 18, 'm', "Beijing", 1111111, "professor", "assitant", 100);
  person.show();
  system("pause");
  return 0;
}